package com.shaw.tiger;

public class DaoPatternDemo {

	public static void main(String[] args) {
		StudentDao sDao = new StudentDaoImpl();

		for (Student s : sDao.getAllStudents()) {
			System.out.println("Student: [Roll No:" + s.getRollNo() + ", Name:" + s.getName() + "]");
		}

		Student student = sDao.getAllStudents().get(0);
		student.setName("tiao");
		sDao.updateStudent(student);

		sDao.getStudent(0);
		System.out.println("Student: [Roll No:" + student.getRollNo() + ", Name:" + student.getName() + "]");
	}

}
